package com.config;

import com.entity.User;
import com.service.NameServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.web.servlet.ConditionalOnMissingFilterBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(XbConfig.class)
public class NameConfig {
    @Bean
    public User user(){
        return new User();
    }
    @Bean
    @ConditionalOnMissingBean
    public NameServiceImpl nameService(){
        return new NameServiceImpl();
    }
}
